package proxy.dynamicProxy;

import proxy.dynamicProxy.base.ITeacherDao;
import proxy.dynamicProxy.proxyFactory.ProxyFactory;
import proxy.dynamicProxy.target.TeacherDao;

public class Client {
    public static void main(String[] args) {
        ITeacherDao proxyInstance = (ITeacherDao) new ProxyFactory(new TeacherDao()).getProxyInstance();
        proxyInstance.teach();

        System.out.println(proxyInstance.handle("JoJo"));
    }
}
